package com.dragon.task.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.dragon.common.repository.mybatis.MyBatisRepository;
import com.dragon.task.entity.AcTaskLoanId;

@MyBatisRepository
public interface AcTaskLoanIdMapper {

    int insertSelective(AcTaskLoanId record);
    
    /**
     * 根据taskType来获取对应的loanId 集合
     * @param taskType
     * @return
     */
    List<String> selectLoanIdsByTaskType(Map<String, Object> paramMap);
    
    int updateByPrimaryKeySelective(AcTaskLoanId record);
    
    void deleteByLoanId(String loanId);

	List<String> selectLoanIdByTimeout(Integer timeOutHour);
	
	/**
	 * 认领机制
	 * @param paramMap
	 * @return
	 */
	int updateClaimNumber(Map<String, Object> paramMap);
	
	/**
	 * 超过五分钟取消认领
	 */
	void cancelClaim(Date timeOutDate);
	
	List<String> selectLoanIdsByTaskTypeNew(String taskType);
}